# Murrina Nine Human III ~ by Alex Armstrong
# Based on Shiki-Colors 2.1 by perfectska04 (Victor C.) unless otherwise noted. perfectska's comments are prefigured by "[Shiki-Colors]"
# !!! indicates values or settings undergoing testing

# My old values
#gtk_color_scheme = "fg_color:#101010\nbg_color:#EBE4D3\nbase_color:#FFFEFC\ntext_color:#1A1A1A\nselected_bg_color:#FFA443\nselected_fg_color:#101010\ntooltip_bg_color:#FFCA8B\ntooltip_fg_color:#F5F5B5"

# Closer to actal Human theme (bg, base, tooltip: different)
gtk_color_scheme = "fg_color:#101010\nbg_color:#EBE4D3\nbase_color:#FFFEFC\ntext_color:#1A1A1A\nselected_bg_color:#FFA443\nselected_fg_color:#101010\ntooltip_bg_color:#f9d083\ntooltip_fg_color:#F5EAC4"

#########
# ICONS 
#########
gtk-icon-sizes = "panel-menu=24,24" # From the official Human theme
gtk-icon-sizes	= "gtk-button=16,16" # [Shiki-Colors] This makes button icons smaller.
#gtk-icon-sizes	= "gtk-large-toolbar=16,16:gtk-small-toolbar=16,16:panel-menu=16,16:gtk-button=16,16" # [Shiki-Colors] This enables "compact-mode".
#gtk-button-images	= 0 # [Shiki-Colors] Enables or disables icons on buttons
#gtk-menu-popup-delay	= 1 # [Shiki-Colors] Makes menus pop up faster! Set to 1 instead of 0 to avoid Banshee 1 bug.

include "panel.rc"

##########################
# GENERAL THEME SETTINGS 
##########################
style "murrine-default"
{
	xthickness = 1
	ythickness = 1

	GtkButton::child-displacement-x	= 0 # Pressed button icon displacement.
	GtkButton::child-displacement-y	= 1 # Pressed button icon displacement.

	GtkButton::default-border	= { 0, 0, 0, 0 }
	GtkCheckButton::indicator-size	= 14 # [Shiki-Colors] Size for check buttons.
	GtkRadioButton::indicator-size	= 14 # [Shiki-Colors] Size for radio buttons.
	GtkPaned::handle-size		= 6 # [Shiki-Colors] Width of handles.

	GtkRange::trough-border		= 2
	GtkRange::slider-width		= 13
	GtkRange::stepper-size		= 13

	GtkScale::slider-length		= 24 # [Shiki-Colors] Length of sliders.
	GtkScale::trough-side-details	= 1
	GtkScrollbar::min-slider-length	= 30 # [Shiki-Colors] Min. length of scrollbars.

	GtkMenuBar::internal-padding	= 0
	GtkExpander::expander-size	= 16
	GtkToolbar::internal-padding	= 1 # [Shiki-Colors] Toolbar padding.
	GtkTreeView::expander-size	= 14
	GtkTreeView::vertical-separator	= 0

	GtkMenu::horizontal-padding	= 0
	GtkMenu::vertical-padding	= 0

	WnckTasklist::fade-overlay-rect	= 0
	GtkEntry::honors-transparent-bg-hint = 1

#	GtkButton::focus-padding	= 0 # [Shiki-Colors] This can give you a more compact appearance.
#  	GtkScrolledWindow::scrollbar-spacing	= 1 # [Shiki-Colors] This sets the spacing between scrollbars.
	GtkTreeView::odd_row_color	= shade (0.96, @base_color)

# [Shiki-Colors] Uncomment one or both of the following for flat/unified menus or toolbars:
#	GtkToolbar::shadow-type		= GTK_SHADOW_NONE  # Makes toolbars flat and unified.
#	GtkMenuBar::shadow-type		= GTK_SHADOW_NONE  # Makes menus flat and unified.

	####################
	# Color Definitions
	####################

	fg[NORMAL]        = @fg_color 
	fg[PRELIGHT]      = @fg_color
	fg[SELECTED]      = @selected_fg_color
	fg[ACTIVE]        = @fg_color
	fg[INSENSITIVE]   = shade (0.7, @bg_color)

	bg[NORMAL]        = @bg_color
	bg[PRELIGHT]      = shade (1.032, @bg_color)
	bg[SELECTED]	  = @selected_bg_color  # Color for selected items.
	bg[INSENSITIVE]   = @bg_color
	bg[ACTIVE]        = shade(0.94, @bg_color)

	base[NORMAL]      = @base_color	
	base[PRELIGHT]    = "#ff00ff" # !!! no idea what this does. if you find pink somewhere, tell me!
	base[ACTIVE]      = shade(0.94, @bg_color)
	base[SELECTED]    = @tooltip_bg_color  # Color for selected base items.
	base[INSENSITIVE] = @bg_color

	text[NORMAL]      = @text_color
	text[PRELIGHT]    = @text_color
	text[ACTIVE]      = @fg_color
	text[SELECTED]    = @fg_color
	text[INSENSITIVE] = shade (0.7, @bg_color)

	engine "murrine" 
	{
		animation           = TRUE  # FALSE = disabled, TRUE = enabled
		colorize_scrollbar  = TRUE # FALSE = disabled, TRUE = enabled
		contrast            = 1.1   # 0.8 for less contrast, more than 1.0 for more contrast on borders
		glazestyle          = 0     # 0 = flat highlight, 1 = curved highlight, 2 = concave style, 3 = top curved highlight, 4 = beryl highlight
		gradient_shades     = {1.06,1.00,1.00,0.94} # proper
		#gradient_shades     = {1.00,1.00,1.00,1.00} # flat
		gradients           = TRUE  # FALSE = disabled, TRUE = enabled
		highlight_shade     = 1.0  # set highlight amount for buttons or widgets
		lightborder_shade   = 1.2   # sets lightborder amount for buttons or widgets
		lightborderstyle    = 1     # 0 = lightborder on top side, 1 = lightborder on all sides
		listviewheaderstyle = 1     # 0 = flat, 1 = glassy, 2 = raised
		listviewstyle       = 1     # 0 = nothing, 1 = dotted
		toolbarstyle	    = 0     # 0 = flat, 1 = glassy, 2 = gradient
		menubarstyle        = 0     # 0 = flat, 1 = glassy, 2 = gradient, 3 = striped
		menubaritemstyle    = 1     # 0 = menuitem look, 1 = button look
		menuitemstyle       = 1     # 0 = flat, 1 = glassy, 2 = striped
		menustyle           = 0     # 0 = no vertical menu stripe, 1 = display vertical menu stripe
		reliefstyle	    = 2     # 0 = flat, 1 = inset, 2 = shadow
		rgba		    = FALSE  # FALSE = disabled, TRUE = enabled
		roundness           = 2     # 0 = squared, 1 = old default, more will increase roundness
		scrollbarstyle      = 2     # 0 = nothing, 1 = circles, 2 = handles, 3 = diagonal stripes, 4 = diagonal stripes and handles, 5 = horizontal stripes, 6 = horizontal stripes and handles
		sliderstyle         = 1     # 0 = nothing added, 1 = handles
		stepperstyle        = 1     # 0 = standard, 1 = integrated stepper handles, 2 = unknown
#		profile		    = MURRINE # engine style options: CANDIDO, CLEARLOOKS, MIST, MURRINE, NODOKA

		glow_shade          = 0.94 # 0.0-2.0
		glowstyle           = 1 # 0 = top glow, 1 = bottom glow, 2 = top and bottom glow, 3 = horizontal glow, 4 = centered glow
		progressbarstyle = 0
	}
}

#################
# THEME MODULES 
#################
style "evolution-hack" = "murrine-default" # Hacks for Evolution Mail.
{	
	bg[NORMAL] = @bg_color
	bg[PRELIGHT] = shade (1.032, @bg_color) # !!! Doesn't work?
	bg[ACTIVE] = shade(0.94, @bg_color) # Color for unfocused evo selected items.
	bg[INSENSITIVE] = @bg_color # !!! not sure what this does. it appears to be triggered when the application shuts down
	bg[SELECTED] = @tooltip_bg_color # Color for evo selected items.
	fg[ACTIVE] = @fg_color # Color for evo active text.
	fg[SELECTED] = @fg_color # Color for evo selected text.
}

style "murrine-wide"
{
	xthickness = 2
	ythickness = 2
}

style "murrine-wider"
{
	xthickness = 3
	ythickness = 3
}

style "murrine-button" = "murrine-wider"
{
	bg[NORMAL] = shade(1.034, @bg_color)
	bg[PRELIGHT] = shade(1.067, @bg_color)

	engine "murrine" {
		contrast = 1.2
	}
}

style "murrine-notebook-bg"
{
	bg[NORMAL] = shade (1.017, @bg_color)
}

style "murrine-notebook" = "murrine-notebook-bg"
{
	xthickness = 2 # Width of tabs and notebook borders.
	ythickness = 2 # Height of tabs and notebook borders.
}

style "murrine-menu" = "murrine-wider"
{
	#xthickness = 0
	#ythickness = 0

	bg[NORMAL] = shade (1.032, @bg_color)
}

style "murrine-menu-item" = "murrine-wider"
{
	bg[PRELIGHT] = shade (0.94, @bg_color)
	bg[SELECTED] = shade (0.94, @bg_color)
	fg[PRELIGHT] = @fg_color
	fg[SELECTED] = @fg_color

	text[NORMAL] = @fg_color
	text[PRELIGHT] = @fg_color
}

style "murrine-menubar-item" = "murrine-wider"
{
	bg[PRELIGHT] = @bg_color
	bg[SELECTED] = @bg_color
	fg[PRELIGHT] = @fg_color
	fg[SELECTED] = @fg_color
}

style "murrine-separator-menu-item"
{
	GtkSeparatorMenuItem::horizontal-padding = 4
	# We are setting the desired height by using wide-separators.
	# There is no other way to get the odd height ...
	GtkWidget::wide-separators = 1
	GtkWidget::separator-width = 1
	GtkWidget::separator-height = 7
	xthickness = 1
	ythickness = 0
}

style "murrine-menubar"
{
	#bg[NORMAL] = shade(0.94, @bg_color)
}

style "murrine-toolbar" = "murrine-default"
{
	engine "murrine" {
		#gradient_shades = {0.94,0.97,0.97,1.00} # for dark menubar
		#gradient_shades = {1.00,0.97,0.97,0.94} # for normal menubar
	}
}

style "murrine-treeview"
{
  	engine "murrine" {
		#roundness = 0  # [Shiki-Colors] This makes treeview progressbars square.
		# !!! Redundant in murrine? Deluge squares both progress bars & checkboxes
	}
}

style "murrine-treeview-header" = "murrine-default"
{
	xthickness = 2
	ythickness = 1

	engine "murrine" {
		#glazestyle = 3 # better dividers but ugly details at end in some places
	}
}

style "murrine-frame-title"
{
	fg[NORMAL] = lighter (@fg_color)
}

style "murrine-tooltips" = "murrine-wider"
{
	xthickness = 4
	ythickness = 4

	bg[NORMAL] = @tooltip_fg_color
	fg[NORMAL] = @fg_color
}

style "metacity-frame" = "murrine-default"
{
	bg[SELECTED] = @selected_bg_color
}

style "murrine-progressbar" = "murrine-wide"
{
	bg[SELECTED] = @selected_bg_color
	fg[PRELIGHT] = @selected_fg_color  # [Shiki-Colors] Progressbar prelighted text.

	engine "murrine" {
		contrast = 1.2
	}
}

style "murrine-statusbar"
{
}

style "murrine-comboboxentry"
{
	#base[NORMAL] = @tooltip_fg_color #!!!
}

style "murrine-spinbutton"
{
}

style "murrine-scale" = "murrine-button"
{
	GtkRange::slider-width  = 14
	GtkScale::slider-length = 26

	bg[NORMAL] = shade (0.94, @bg_color)
	#bg[PRELIGHT] = shade(1.034, @bg_color) # approximation of #ebe4d2
	bg[PRELIGHT] = "#ebe4d2"
	bg[SELECTED] = @selected_bg_color

	engine "murrine" {
		contrast = 1.2
	}
}

style "murrine-hscale" = "murrine-scale"
{
}

style "murrine-vscale" = "murrine-scale"
{
}

style "murrine-nautilus-location" # Workaround for nautilus' messages.
{
	bg[NORMAL] = @tooltip_bg_color
}

style "murrine-radiocheck" = "murrine-default"
{
#!!! These were commented in Shiki. Everything seems fine at the moment.
#	text[NORMAL] = shade (0.9, @tooltip_bg_color) # [Shiki-Colors] Color for checks/radio items.
#	bg[SELECTED] = lighter (@tooltip_bg_color) # [Shiki-Colors] Color for prelight of check/radio buttons.
}

style "murrine-scrollbar"
{
	#bg[SELECTED] = @selected_bg_color
	bg[ACTIVE] = "#efe9db" # fix for firefox scrollbar background
	bg[SELECTED] = shade (0.94, @bg_color)

	engine "murrine" {
		contrast = 1.2
	}
}

style "murrine-hscrollbar" = "murrine-scrollbar"
{
}

style "murrine-vscrollbar" = "murrine-scrollbar"
{
}


style "murrine-evo-new-button-workaround"
{
}
widget_class "EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*" style "murrine-evo-new-button-workaround"

class "GtkToolbar"   style "murrine-toolbar" 
class "GtkHandleBox" style "murrine-toolbar"


###############################################################################
# The following part of the gtkrc applies the different styles to the widgets.
###############################################################################

# Clearlooks default style is applied to every widget.
class "GtkWidget"    style "murrine-default"

# Increase the x/ythickness in some widgets.
class "GtkToolbar"   style "murrine-toolbar" 
class "GtkFrame"     style "murrine-wide"
class "GtkEntry"     style "murrine-wider"
class "MetaFrames"   style "metacity-frame"
class "GtkSeparator" style "murrine-wide"
class "GtkWindow"    style "metacity-frame"
class "GtkCalendar"  style "murrine-wide"

class "GtkSpinButton"  style "murrine-spinbutton"
class "GtkScale"       style "murrine-scale"
class "GtkVScale"      style "murrine-vscale"
class "GtkHScale"      style "murrine-hscale"
class "GtkScrollbar"   style "murrine-scrollbar"
class "GtkVScrollbar"  style "murrine-vscrollbar"
class "GtkHScrollbar"  style "murrine-hscrollbar"

class "GtkRadio*"	style "murrine-radiocheck"
class "GtkCheck*"	style "murrine-radiocheck"

# General matching following, the order is choosen so that the right styles override each other eg. progressbar needs to be more important then the menu match.

# This is not perfect, it could be done better (That is modify *every* widget in the notebook, and change those back that we really don't want changed)
widget_class "*<GtkNotebook>*<GtkEventBox>"     style "murrine-notebook-bg"
widget_class "*<GtkNotebook>*<GtkDrawingArea>"  style "murrine-notebook-bg"
widget_class "*<GtkNotebook>*<GtkLayout>"       style "murrine-notebook-bg"
widget_class "*.GtkNotebook.*.GtkViewport"	style "murrine-notebook"

widget_class "*<GtkButton>"      style "murrine-button"
widget_class "*<GtkNotebook>"    style "murrine-notebook"
widget_class "*<GtkStatusbar>*"  style "murrine-statusbar"

widget_class "*<GtkComboBoxEntry>*" style "murrine-comboboxentry"
widget_class "*<GtkCombo>*"         style "murrine-comboboxentry"

widget_class "*<GtkMenuBar>*"           style "murrine-menubar"
widget_class "*<GtkMenu>*"              style "murrine-menu"
widget_class "*<GtkMenuItem>*"          style "murrine-menu-item"
widget_class "*MenuBar.*" 		style "murrine-menubar-item" #!!! does this create bugs anywhere?
widget_class "*<GtkSeparatorMenuItem>*" style "murrine-separator-menu-item"

widget_class "*.<GtkFrame>.<GtkLabel>" style "murrine-frame-title"
widget_class "*.<GtkTreeView>*"        style "murrine-treeview"

widget_class "*<GtkProgressBar>"       style "murrine-progressbar"

# Treeview header
widget_class "*.<GtkTreeView>.<GtkButton>" style "murrine-treeview-header"
widget_class "*.<GtkCTree>.<GtkButton>"    style "murrine-treeview-header"
widget_class "*.<GtkList>.<GtkButton>"     style "murrine-treeview-header"
widget_class "*.<GtkCList>.<GtkButton>"    style "murrine-treeview-header"

# Workarounds for Evolution
widget_class "*.ETable.ECanvas"    style "murrine-treeview-header"
widget_class "*.ETree.ECanvas"    style "murrine-treeview-header"
widget_class "*GtkCTree*"	style "evolution-hack"
widget_class "*GtkList*"	style "evolution-hack"
widget_class "*GtkCList*"	style "evolution-hack"
widget_class "*.ETree.*"	style "evolution-hack"
widget_class "*EInfoLabel*"	style "evolution-hack"

# The window of the tooltip is called "gtk-tooltip"
################################
# FIXME:
# This will not work if one embeds eg. a button into the tooltip.
# As far as I can tell right now we will need to rework the theme
# quite a bit to get this working correctly.
# (It will involve setting different priorities, etc.)
################################
widget "gtk-tooltip*" style "murrine-tooltips"

###################################################
# SPECIAL CASES AND WORKAROUNDS
###################################################

# Special case the nautilus-extra-view-widget
# ToDo: A more generic approach for all applications that have a widget like this.
widget "*.nautilus-extra-view-widget" style : highest "murrine-nautilus-location"

# Work around for http://bugzilla.gnome.org/show_bug.cgi?id=382646
# Note that the work around assumes that the combobox is _not_ in appears-as-list mode.
# This style does not affect GtkComboBoxEntry, it does have an effect on comboboxes in appears-as-list mode though.
style "murrine-text-is-fg-color-workaround"
{
	text[NORMAL]      = @fg_color
	text[PRELIGHT]    = @fg_color
	text[SELECTED]    = @selected_fg_color
	text[ACTIVE]      = @fg_color
	text[INSENSITIVE] = shade (0.5, @bg_color)
}
widget_class "*.<GtkComboBox>.<GtkCellView>"   style "murrine-text-is-fg-color-workaround"

style "murrine-menuitem-text-is-fg-color-workaround"
{
	text[NORMAL]        = @fg_color
	text[PRELIGHT]      = @selected_fg_color
	text[SELECTED]      = @selected_fg_color
	text[ACTIVE]        = @fg_color
	text[INSENSITIVE]   = shade (0.5, @bg_color)
}
widget "*.gtk-combobox-popup-menu.*"   style "murrine-menuitem-text-is-fg-color-workaround"

# Work around the usage of GtkLabel inside GtkListItems to display text.
# This breaks because the label is shown on a background that is based on the base color set.
style "murrine-fg-is-text-color-workaround"
{
	fg[NORMAL]      = @text_color
	fg[PRELIGHT]    = @text_color
	fg[ACTIVE]      = @selected_fg_color
	fg[SELECTED]    = @selected_fg_color
	fg[INSENSITIVE] = shade (0.5, @bg_color)
}
widget_class "*<GtkListItem>*" style "murrine-fg-is-text-color-workaround"
# The same problem also exists for GtkCList and GtkCTree.
# Only match GtkCList and not the parent widgets, because that would also change the headers.
widget_class "*<GtkCList>" style "murrine-fg-is-text-color-workaround"
widget_class "*<EelEditableLabel>" style "murrine-fg-is-text-color-workaround"

# From the official Human 0.28.x by Kenneth Wimar & Conn O'Griofa
style "murrine-evo-new-button-workaround"
{

	engine "murrine" {
		toolbarstyle = 0
	}
}

widget_class "EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*" style "murrine-evo-new-button-workaround"
